package com.hou.service;

import com.hou.dao.UserDao;
import com.hou.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author shkstart
 * @create 2021-09-19-11:13
 */
@Service
public class UserServiceImpl implements UserService{
    @Autowired
    private UserDao userDao;
    @Override
    public void register(User user) {
        userDao.save(user);
    }

    @Override
    public Boolean findByUserName(User user) {
        if (userDao.findByUserName(user) != null){
            return false;
        } else {
            return true;
        }
    }

    @Override
    public User userInfo(User user) {
        return userDao.userInfo(user);
    }


}
